﻿using System;
using UnitDriven;

#if MSTEST
using Microsoft.VisualStudio.TestTools.UnitTesting;
#elif NUNIT
using NUnit.Framework;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
#endif

namespace Silverlight
{
    [TestClass]
    public abstract class InheritedTestsAbstractSuperClass
    {
        public abstract void ShouldNotAppear();

        [TestMethod]
        public abstract void ShouldAppear1();

        [TestMethod]
        public abstract void ShouldAppear2();
    }

    public class InheritedTestsSuperClass : InheritedTestsAbstractSuperClass
    {
        [TestMethod]
        public void TestOnSuperClass()
        {
            Assert.IsTrue(this is InheritedTestsSuperClass);
        }

        public override void ShouldNotAppear()
        {
            Assert.Fail();
        }

        public override void ShouldAppear1()
        {
            Assert.IsTrue(this is InheritedTestsSuperClass);
        }

        public override void ShouldAppear2()
        {
        }
    }

    public class InheritedTests : InheritedTestsSuperClass
    {
        [TestMethod]
        public void ShouldOnlyBeVisibleOnInheritedTests()
        {
        }

        public override void ShouldNotAppear()
        {
            Assert.Fail();
        }

        public override void ShouldAppear2()
        {
        }
    }
}

namespace Silverlight.Nested
{
    [TestClass]
    public class NestedTest
    {
        [TestMethod]
        public void NestedTestMethod()
        {
        }
    }
}
